{% extends "moban1788/base.html" %}
{% block main %}
<div class="page-title cart-title">
  <div class="container-fluid">
    <form method= 'get' style="margin-bottom: 4%">
        <div class="row">
                <div class="col-md-4 col-lg-push-2">
                    <h3 style="margin-bottom: 5%; text-align: center; text-align: center;color: white; margin-top: 8%">A组热门展示用户</h3>
                    {% for list in temp_a %}
                        <div style="display: inline">
                            <img src="{{ list.anchor.avatar }}" style="border-radius:50%; width: 60px; float: left; margin-left: 1%"/>
                            <p style="text-align: left; float: left">&nbsp;{{ list.anchor.name }}</p>
                            <br/>
                            <br/>
                            <p style="text-align: left;">&nbsp;{{ list.realtime_count }}/{{ list.current_beans }}</p>
                            <hr style="height: 2px;border:none;border-top:1px solid #185598;width: 80%;">
                        </div>
                    {% endfor %}
                </div>
                <div class="col-md-4 col-lg-push-3">
                    <h3 style="margin-bottom: 5%; margin-top: 8%;text-align: center; color: white">B组热门展示用户</h3>
                    {% for list in temp_b %}
                        <div style="display: inline">
                            <img src="{{ list.anchor.avatar }}" style="border-radius:50%; width: 60px; float: left"/>
                            <p style="text-align: left; float: left">&nbsp;{{ list.anchor.name }}</p>
                            <br/>
                            <br/>
                            <p style="text-align: left;">&nbsp;{{ list.realtime_count }}/{{ list.current_beans }}</p>
                            <hr style="height: 2px;border:none;border-top:1px solid #185598;width: 80%;">
                        </div>
                    {% endfor %}
                </div>
        </div>
        <script language="javascript">
            var strHref = window.location.href;
            var pageName = parseInt(strHref.split("?page=")[1]);
            if (isNaN(pageName)){
                pageName = 1;
            }
            function forward(){
                window.location.href="../onairlist/";
{#                var num = pageName - 1;#}
{#                if (num == 0){#}
{#                    alert("到达第一页喽,没有上一页啦");#}
{#                }#}
{#                else {#}
{#                    window.location.href="../onairlist/?page="+ num;#}
{#                }#}
            }
            function back(){
                var num= pageName + 1;
                window.location.href="../onairlist/?page="+ num;
            }
        </script>
        <input type="button" id='up' name="up" value='首页' onclick="forward()" class="btn btn-info" style="margin-top: 3%;margin-left: 45%">
        <input type="button" id='down' name="down" value='下一页' onclick="back()" class="btn btn-info" style="margin-top: 3%;margin-left: 1%">
    </form>
  </div>
</div>
{% endblock %}
{% block js %}
    <script src="../../../qa/static/js_new/jquery-1.12.4.min.js"></script>
    <script src="../../../qa/static/js_new/bootstrap.min.js"></script>
{% endblock %}